<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>数据配置</title>

</head>
<style>
    .layui-form-label {
        width: 120px!important;
    }
    .layui-input-block {
        margin-left: 150px!important;
    }
</style>
<body>
    <div th:include="load"></div>
    <div class="layui-row layui-col-space15 layui-anim layui-anim-upbit">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header layui-form">
                    <span class="layui-breadcrumb">
                        <a href="javascript:void(0)">代码生成器</a>
                        <a><cite>数据配置</cite></a>
                    </span>
                </div>
                <div class="layui-card-body">
                    <table id="data_table" class="layui-hide" lay-filter="data_table"></table>
                </div>
            </div>
        </div>
    </div>

    <!-- 新增编辑表单 -->
    <form class="layui-form" id="data_form" action="" lay-filter="data_form" style="padding:10px;display: none;">
        <fieldset class="layui-elem-field layui-field-title" style="color:#89b586;">
            <legend>基本信息</legend>
        </fieldset>
        <input type="text" name="id" class="layui-input" style="display: none">
        <div class="layui-form-item">
            <label class="layui-form-label">代码生成路径</label>
            <div class="layui-input-block">
                <input type="text" name="projectPath" class="layui-input" placeholder="代码生成路径（不填默认当前项目）">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">追加路径</label>
            <div class="layui-input-block">
                <input type="text" name="comPath" class="layui-input" placeholder="追加路径（/src/main/java）">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">作者</label>
            <div class="layui-input-block">
                <input type="text" name="author" class="layui-input" placeholder="作者">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label req">是否打开目录</label>
            <div class="layui-input-block">
                <input type="radio" name="open_state" value="1" title="是" checked="">
                <input type="radio" name="open_state" value="0" title="否">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label req">swagger2注解</label>
            <div class="layui-input-block">
                <input type="radio" name="swagger2" value="1" title="是" checked="">
                <input type="radio" name="swagger2" value="0" title="否">
            </div>
        </div>
        <fieldset class="layui-elem-field layui-field-title" style="color:#89b586;">
            <legend>生成拼接后缀</legend>
        </fieldset>
        <div class="layui-form-item">
            <label class="layui-form-label">Controller后缀</label>
            <div class="layui-input-block">
                <input type="text" name="controller" class="layui-input" placeholder="Controller后缀">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">Service后缀</label>
            <div class="layui-input-block">
                <input type="text" name="service" class="layui-input" placeholder="Service后缀">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">ServiceImpl后缀</label>
            <div class="layui-input-block">
                <input type="text" name="serviceImpl" class="layui-input" placeholder="ServiceImpl后缀">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">Dao或Mapper后缀</label>
            <div class="layui-input-block">
                <input type="text" name="dao" class="layui-input" placeholder="Dao或Mapper后缀">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">Entity实体类后缀</label>
            <div class="layui-input-block">
                <input type="text" name="entity" class="layui-input" placeholder="Entity实体类后缀">
            </div>
        </div>
        <fieldset class="layui-elem-field layui-field-title" style="color:#89b586;">
            <legend>表前缀操作</legend>
        </fieldset>
        <div class="layui-form-item">
            <label class="layui-form-label">表前缀</label>
            <div class="layui-input-block">
                <input type="text" name="beginTableName" class="layui-input" placeholder="表前缀（sys_），填写则截取指定前缀，不填写则自动截取表名前缀">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label req">表前缀是否截取</label>
            <div class="layui-input-block">
                <input type="radio" name="beginTn" value="1" title="是" checked="">
                <input type="radio" name="beginTn" value="0" title="否">
            </div>
        </div>
        <fieldset class="layui-elem-field layui-field-title" style="color:#89b586;">
            <legend>主包路径</legend>
        </fieldset>
        <div class="layui-form-item">
            <label class="layui-form-label">生成主包路径</label>
            <div class="layui-input-block">
                <input type="text" name="modulesPath" class="layui-input" placeholder="生成主包路径（com.modules）">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">controller层子包</label>
            <div class="layui-input-block">
                <input type="text" name="controllerPath" class="layui-input" placeholder="controller层子包（表前缀替换成包名：controller.${package} 如：controller.sys）">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">service层子包</label>
            <div class="layui-input-block">
                <input type="text" name="servicePath" class="layui-input" placeholder="service层子包（表前缀替换成包名：service.${package} 如：service.sys）">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">service.impl层子包</label>
            <div class="layui-input-block">
                <input type="text" name="serviceImplPath" class="layui-input" placeholder="service.impl层子包（表前缀替换成包名：service.${package}.impl 如：service.sys.impl）">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">dao层子包</label>
            <div class="layui-input-block">
                <input type="text" name="daoPath" class="layui-input" placeholder="dao层子包（表前缀替换成包名：dao.${package} 如：dao.sys）">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">entity层子包</label>
            <div class="layui-input-block">
                <input type="text" name="entityPath" class="layui-input" placeholder="entity层子包（表前缀替换成包名：entity.${package} 如：entity.sys）">
            </div>
        </div>
        <fieldset class="layui-elem-field layui-field-title" style="color:#89b586;">
            <legend>字段过滤</legend>
        </fieldset>
        <div class="layui-form-item">
            <label class="layui-form-label">entity层子包</label>
            <div class="layui-input-block">
                <input type="text" name="notField" class="layui-input" placeholder="父类已经存在不需要生成的字段（多个用逗号隔开）">
            </div>
        </div>

        <div class="layui-form-item" style="text-align: center;margin-top: 30px;">
            <a class="layui-btn lay-submit-btn" lay-submit="" lay-filter="submitForm">立即提交</a>
            <a class="layui-btn layui-btn-primary lay-close-btn">关闭</a>
        </div>
    </form>
</body>

<script type="text/html" id="toolberLeft">
    <div class="layui-form">
        <a class="layui-btn layui-btn-sm layui-btn-primary" lay-event="add" style="margin-left: 5px;"><i class="layui-icon">&#xe654;</i>新增</a>
    </div>
</script>
<script type="text/html" id="toolRow">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
    <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

<script type="text/html" id="switchRow">
    <input type="checkbox" yid="{{d.id}}" {{d.state==1?"checked":""}} name="state" lay-skin="switch" lay-filter="stateSwitch" lay-text="启用|禁用">
</script>

<script type="text/javascript" th:src="@{/js/generator/generator_config.js}"></script>

</html>